var posi_logo=document.querySelector(".lenovo_icon .lenovo_long");
var posi_l=document.querySelector(".lenovo_icon .lenovo");
var header_nav=document.querySelector(".header");
var nav_header=document.querySelector(".header .header_main .nav_header");
var search=document.querySelector(".header .header_main .search");
var close_img=document.querySelector(".top_img .close_top_img");
var top_img=document.querySelector(".top_img");
var serve=document.querySelector(".serve_hover serve");
var buy_log=document.querySelector(".header .header_main .nav_right");
var serve=document.querySelector(".header .header_main .nav_header ul .serve_hover .serve"),
	sidebarl=document.querySelector(".sidebar .list_sidebar"),
	detail_sidebar=document.querySelector(".detail_sidebar"),
	details_left_posi=document.querySelector(".details_left_posi");
//点击关闭图片
	close_img.onclick=function(){
		setTimeout(function(){
			top_img.style.display='none';
		},500)
	}
	//滚动事件
	var h=document.body.scrollTop;
	if(h>=124){
		header_nav.style.position='fixed';
		header_nav.style.height='57px';
		header_nav.style.lineHeight='57px';
		header_nav.style.top='0';
		search.style.marginTop="18px";
		nav_header.style.height="57px";
		nav_header.style.lineHeight="57px";
		serve.style.top='-50px';
	}

	//滚动条事件
	window.onscroll=function(){
//		var client =document.documentElement.clientHeight;//获取自身的高度(包括边框)[样式里面的高度]
		var scrTop=document.documentElement.scrollTop+document.body.scrollTop;
		if(scrTop>=124){
			header_nav.style.position='fixed';
			header_nav.style.height='57px';
			header_nav.style.width="100%"
			header_nav.style.lineHeight='57px';
			posi_logo.style.display='none';
			posi_l.style.display="block";
			search.style.marginTop='18px';
			nav_header.style.height="57px";
			nav_header.style.lineHeight="57px";
			buy_log.style.marginTop="-7px";
			serve.style.top='57px';	
			sidebarl.style.position='fixed';
			sidebarl.style.top='57px';			
		}
		else{
			posi_logo.style.display='';
			posi_l.style.display="none";
			header_nav.style.position='relative';
			header_nav.style.top='0';
			header_nav.style.height='74px';
			search.style.marginTop='25px';
			nav_header.style.height="73px";
			nav_header.style.lineHeight="73px";
			buy_log.style.marginTop="0";
			serve.style.top='73px';	
			sidebarl.style.position='absolute';
			sidebarl.style.top='0';	
		}
		
	}


//搜索栏判断
var search_top=document.querySelector("#search_top"),
	input_on=document.querySelector(".input_on");
	
	search_top.addEventListener("focus",function(){//提取焦点
		input_on.style.display='none';
	})
	search_top.addEventListener("blur",function(){//移出
		input_on.style.display='block';
	})

